package com.icetech.eom.service.impl.sys;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.icetech.eom.dao.sys.RolePermissionDao;
import com.icetech.eom.domain.sys.RolePermission;
import com.icetech.eom.service.sys.IRolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzw
 * @since 2018-12-10
 */
@Service
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionDao, RolePermission> implements IRolePermissionService {
    @Autowired
    private RolePermissionDao rolePermissionDao;

    @Override
    public List<RolePermission> findByPermissionId(Long permissionId) {
        return rolePermissionDao.findByPermissionId(permissionId);
    }

    @Override
    public List<RolePermission> findByRoleId(Long roleId) {
        return rolePermissionDao.findByRoleId(roleId);
    }

    @Override
    public void deleteByRoleId(Long roleId) {
        rolePermissionDao.deleteByRoleId(roleId);
    }
}
